<?php

namespace console\controllers;
use console\models\Order;
use yii\console\Controller;

/**
 * 活动相关的任务处理
 */
class ActivityController extends BaseController {

	public function actionTest(&$param) {
		\Yii::info("param1234:" . json_encode($param)); 
		$result = Order::find()->asArray()->one();
		//\Yii::info("result:".json_encode($result,JSON_UNESCAPED_UNICODE));
		$param['result'] = $result;
	}

	public function actionIndex() {
		$param = ['a' => 'a', 'b' => 'b'];
		\Yii::$app->runAction('activity/test', [ & $param]);
		$result = [];
		$result = $param['result'];
		echo "dowork result:" . json_encode($result, JSON_UNESCAPED_UNICODE);
	}

}